<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
  "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <title></title>
  <link href="../Styles/styles.css" type="text/css" rel="stylesheet"/>
</head>

<body>
  <h2 id="opening_files_externally">管理插件</h2>

  <p class="h2subheading">— 扩展 Sigil 功能 —</p>

  <p>You can extend the functionality of Sigil by installing Python 3 plugins. (Since Sigil comes with an embedded Python 3 interpreter and several Python libraries optimized for Sigil, you won’t have to install Python 3 on your system.)</p>
  <p>您可以通过安装 Python 3 插件来扩展 Sigil 的功能。（由于 Sigil 带有嵌入式 Python 3 解释器和针对 Sigil 优化的多个 Python 库，因此您无需在系统上安装 Python3。）</p>

  <div class="image">
    <img alt="manage plugins" src="../Images/manage-plugins.png"/>
  </div>

  <h4 class="sigil_not_in_toc">安装插件：</h4>

  <p>To install a plugin:</p>
  <p>要安装插件：</p>

  <ol>
    <li>Download the desired plugin .zip file.<br/>(You can find an <a href="http://www.mobileread.com/forums/showthread.php?t=247431">up-to-date list of all supported Sigil plugins</a> on MR.)</li>
    <li>下载所需的插件 .zip 文件。<br/>（您可以找到 <a href="http://www.mobileread.com/forums/showthread.php?t=247431">up-to-date list of all supported Sigil plugins</a>。）</li>

    <li>Select Plugins &gt; Manage Plugins and click Add Plugin.</li>
    <li>选择 插件 &gt; 管理插件，然后单击添加插件。</li>

    <li>Select the plugin .zip file and click OK.</li>
    <li>选择插件 .zip 文件，然后单击确定。</li>

    <li>Enable Use Bundled Python, if it isn’t already enabled. <br/>(If Use Bundled Python can’t be selected, click <span class="buttonbox">Auto</span> or <span class="buttonbox">Set</span> to select an external Python interpreter.)</li>
    <li>启用“使用捆绑的 Python”（如果尚未启用）。<br/>（如果无法选择“使用捆绑的 Python”，请单击 <span class="buttonbox">自动</span> 或 <span class="buttonbox">设置</span> 以选择外部 Python 解释器。）</li>
  </ol>

  <div class="tip">
    <p class="tiptext">Don’t unpack or rename plugin .zip files!</p>
    <p class="tiptext">不要解压缩或重命名插件 .zip 文件！</p>
  </div>

  <p>To run a plugin simply select it from the Plugins menu. For example, to run the FlightCrew plugin select Plugins &gt; Validation &gt; FlightCrew.</p>
  <p>要运行插件，只需从“插件”菜单中选择它即可。 例如，要运行FlightCrew插件，请选择“插件 &gt; 验证 &gt; FlightCrew”。</p>

  <h4 class="sigil_not_in_toc">Assign Plugins To Toolbar Buttons:</h4>
  <h4 class="sigil_not_in_toc">将插件分配给工具栏按钮：</h4>

  <p>You can assign the ten most frequently used plugins to Plugin toolbar buttons. (To assign a plugin to a Plugin toolbar button select it from one of the five Assign as Plugin list boxes.)</p>
  <p>您可以将十个最常用的插件分配给“插件”工具栏按钮。（要将插件分配给插件工具栏按钮，请从五个“指定为插件”列表框中选择它。）</p>

  <div class="image">
    <img alt="preferences-spellcheck-add-words" src="../Images/assign-as-plugin.png"/>
  </div>

  <h4 class="sigil_not_in_toc">故障排除：</h4>

  <pre class="example">Error: Interpreter python3.4 has no path set</pre>
  <pre class="example">错误：解释器 python3.4 没有设置路径</pre>

  <p>This error message is usually displayed if Use Bundled Python is disabled and the ≥Python 3.4 text box is empty or contains an invalid path. Click <span class="buttonbox">Auto</span> or <span class="buttonbox">Set</span> to select an external Python interpreter or enable Use Bundled Python.</p>
  <p>如果禁用了“使用捆绑 Python”并且≥ Python3.4 文本框为空或包含无效路径，通常会显示此错误消息。单击 <span class="buttonbox">自动</span> 或 <span class="buttonbox">设置</span> 以选择外部 Python 解释器或启用“使用捆绑的 Python”。</p>

  <pre class="example">Error: Plugin is not a valid Sigil plugin</pre>
  <pre class="example">错误：插件不是有效的 Sigil 插件</pre>

  <p>This error message is usually displayed if the plugin .zip file is invalid <i>or</i> the plugin .zip file was renamed. If you renamed the plugin .zip file, re-download it and retry the installation.</p>
  <p>如果插件 .zip 文件无效 <i>或</i> 插件 .zip 文件被重命名，通常会显示此错误消息。如果您重命名了插件 .zip 文件，请重新下载该文件并重试安装。</p>

  <p>If you’re still experiencing problems, install and run the <a href="https://github.com/Sigil-Ebook/Sigil/raw/master/docs/testplugin_v013.zip">Sigil test plugin</a> and post the results in the MR Sigil Plugins forum.</p>
  <p>如果仍然遇到问题，请安装并运行 <a href="https://github.com/Sigil-Ebook/Sigil/raw/master/docs/testplugin_v013.zip">Sigil 测试插件</a>，然后将运行结果发布在 MR Sigil 插件论坛中。</p>

  <h4 class="sigil_not_in_toc">编写自己的插件：</h4>

  <p>Thanks to a comprehensive Python framework it is relatively easy to write plugins for Sigil. If you’re interested in writing your own Python 3 Sigil plugins, have a look at the <a href="https://github.com/Sigil-Ebook/Sigil/raw/master/docs/Sigil_Plugin_Framework_rev8.epub">Sigil Plugin Framework</a> guide.</p>
  <p>得益于完善的 Python 框架，为 Sigil 编写插件相对容易。如果您有兴趣编写自己的 Python 3 Sigil 插件，请查看 <a href="https://github.com/Sigil-Ebook/Sigil/raw/master/docs/Sigil_Plugin_Framework_rev8.epub">Sigil 插件框架</a> 指南。</p>
</body>
</html>